/**
 * 获取CSS变量值
 * @param varName CSS变量名
 * @param defaultValue 默认值
 */
export const getCssVar = (varName: string, defaultValue: number): number => {
  return (
    parseInt(
      getComputedStyle(document.documentElement).getPropertyValue(varName)
    ) || defaultValue
  );
};
